<?php

namespace App\Http\Controllers\Demo;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Route;

class UserController extends Controller
{
    //
    public function index()
    {
        echo '路由学习';
        // 获取当前路由实例
        $route = Route::current();
//         dd($route);
        // 获取当前路由名称
        $name = Route::currentRouteName();
//        dd($name);
        // 获取当前路由action属性
        $action = Route::currentRouteAction();
        dd($action);
        return route('user7');

    }

    public function form()
    {
        return view('form',['csrf'=>csrf_token()]);
    }
}
